package biz.ezcom.design.pattern.observer;

import java.util.Observable;
import java.util.Observer;
/**
 * 看股票的同事：观察者 
 */
public class ObserverStock implements Observer{
	private String name;
	
	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	@Override
	public void update(Observable o, Object arg) {
		System.out.println();
		System.out.println("观察者姓名：" + name);
		System.out.println("唤醒者：" + o);
		System.out.println("参数：" + arg);
	}

}
